package simulation;

import java.util.List;



public abstract class Force{
	
	private String myName;
	private boolean onOrOff;
	private static final boolean DEFAULT_INITIAL_STATE = true;
    
	public Force(String name){
		myName = name;
		onOrOff = DEFAULT_INITIAL_STATE;
	}
	
	public abstract void apply(List<Mass> myMasses);
	
	
	public String getName(){
		return myName;
	}
	
	public boolean isOn(){
		return onOrOff;
	}
	
	/*
	 * 
	 */
	public void toggle(){
		if(onOrOff)
		{
			onOrOff = false;
		}
		else
		{
			onOrOff = true;
		}
//		else
//		{// should change to another way of debugging
//			System.out.println("This is impossible");
//			throw new IllegalArgumentException();
//		}
	}	
}
